import itchat
import pymongo

itchat.auto_login()
friends = itchat.get_friends(update=True)[0:]
print(friends)

conn = pymongo.MongoClient("mongodb://localhost:27018/")
db = conn.python
for i in friends:
    db.info.insert(i)
